<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Plane!</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        #main {
            width: 1400px;
            height: 1000px;
            background: url("img/index.png");
            margin: 20px auto;
            position: relative;
            overflow: hidden;
        }
        

        #stop {
            width: 400px;
            height: 500px;
            padding-top: 300px;
            position: absolute;
            z-index: 10;
            /* background-color: rgba(0, 0, 0, 0.6); */
            left: 50%;
            margin-left: -200px;
            top: 100px;
            display: block;
        }

        .button {
            width: 300px;
            height: 70px;
            color: #ffffff;
            background-color: rgba(0, 0, 0, 0.6);
            text-align: center;
            line-height: 50px;
            border-radius: 20px;
            font-size: 26px;
            font-weight: bolder;
            margin: 0 auto;
            margin-top: 10px;
            cursor: pointer;
        }
        .title{
            margin-top: 15%;
            margin-left: 42%;
            font-size: 50px;
            color:darkorange;
        }
    </style>
</head>

<body>
    <div id="main">
        <h1 class="title">Cross Fire</h1>
        
        <div id="stop">
            <div class="button" onclick="first()">Game Start</div>
        
            <div class="button" onclick="selectPage()">Select Level</div>
            <div class="button" onclick="scorePage()">Score Board</div>
            
        </div>
        
    </div>
        <script>
            // 最高分
           
            var grade = document.getElementById("grade");
            var data = localStorage.getItem('grade');
            grade.textContent = data; 
            var d2 = localStorage.getItem('2');
            var d3 = localStorage.getItem('3');
            var d4 = localStorage.getItem('4');
            var d5 = localStorage.getItem('5');
            var d6 = localStorage.getItem('6');

            function first(){
                window.location.href = "plane.html";

            }
            function third(){
                if(d2 == "yes"){
                    window.location.href = "plane2.html";
                    
                }else{
                    alert("请先通过前面的关卡");
                }
                
            } 
            function three(){
                if(d3 == "yes"){
                    window.location.href = "plane3.html";
                    
                }else{
                    alert("请先通过前面的关卡");
                }
                
            }
            function fourth(){
                if(d4 == "yes"){
                    window.location.href = "plane4.html";
                    
                }else{
                    alert("请先通过前面的关卡");
                }
                
            }
            function five(){
                if(d5 == "yes"){
                    window.location.href = "plane5.html";
                    
                }else{
                    alert("请先通过前面的关卡");
                }
                
            }
            
            function surivical(){
                if(d6 == "yes"){
                    window.location.href = "survical.html";
                    
                }else{
                    alert("请先通过前面的关卡");
                }
                
            }
            
            function selectPage(){
              
                window.location.href = "selectPage.html";
                
            }

            function scorePage(){
              
              window.location.href = "scorePage.html";
              
          }



        </script>
</body>

</html>